#pragma once
#include "shapebuilder.h"

#define BOX_LWH_GUID _T("DCAE2A89-8101-4244-A58A-3904C72188A2")

class TFunction_Logbook;
class CBoxInfo : public CShapeInfo
{
public:
	CBoxInfo();
	~CBoxInfo();
	virtual void Reset();

	virtual void GetParams(CVarList& varList, UINT nID);
	virtual void SetParams(const CVarList& varList, UINT nID);

	virtual bool GetFromLabel(TDF_Label& label);
	virtual void AddToLabel(TDF_Label& label);
	virtual bool ModifyLabel(TDF_Label& label, TFunction_Logbook& log);

	static bool IsModified(TDF_Label& label, const TFunction_Logbook& log);
	//------------------------------------------
	gp_Pnt	ptStart;
	Standard_Real dLength;
	Standard_Real dWidth;
	Standard_Real dHeight;
	//-----------------------------------------
	enum PARAM_INDEX_BOX
	{
		IDX_START = 0,

		START_POINT = 1,
			START_X = START_POINT,
			START_Y,
			START_Z,
		LENGTH		= 4,
		WIDTH		= 5,
		HEIGHT		= 6,

		IDX_END
	};
};

//////////////////////////////////////////////////////////////////////////

class CBoxBuilder :
	public CShapeBuilder
{
public:
	CBoxBuilder(void);
	~CBoxBuilder(void);

	bool Build(const CString& szCmdParam, TopoDS_Shape& shape);
	bool Build(CBoxInfo* pShapeInfo, TopoDS_Shape& shape);
};
